<div xmlns="http://www.w3.org/1999/xhtml"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:c="http://java.sun.com/jstl/core"
  xmlns:a4j="http://richfaces.org/a4j"
  xmlns:nxd="http://nuxeo.org/nxweb/document"
  xmlns:nxl="http://nuxeo.org/nxforms/layout">

  <h:form id="subscriptions">

    <c:forEach var="entry"
      items="#{groupsSubscriptionsAction.usersByNotificationsForCurrentDocument.entrySet}">

      <h:panelGroup rendered="#{not empty entry.value}">

        <h3>
          <h:outputText value="#{messages[entry.key]}" />
        </h3>

        <nxl:layout name="user_group_prefixed_suggestion" mode="view"
          value="#{entry.value}" />

      </h:panelGroup>

    </c:forEach>

  </h:form>

  <h:form id="add_subscriptions">
    <h:outputScript target="#{pageJsTarget}">
      jQuery(document).ready(function() {
        jQuery('#add_subscriptions').focusFirst();
      });
    </h:outputScript>

    <div class="userAndGroupFilter">

      <nxl:layout name="user_group_prefixed_suggestion" mode="create"
        value="#{groupsSubscriptionsAction.selectedEntries}" />
      <ui:include src="/incl/group_subscriptions_action.xhtml" />

    </div>

  </h:form>

</div>
